package com.project.genesis.admin.listener;
import org.springframework.stereotype.Component;

/**
 * 该消费者用于接受表单推送记录（push_record表）、
 * 并插入至数据库
 */
@Component
public class FormPushConsumer {
//    @Autowired
//    private AfterPushRecordMapper afterPushRecordMapper;
//    // 监听消息
//    @RabbitListener(queues = RabbitMQEnum.FORM_AFTER_QUEUE)
//    public void receiveFormAfterQueue(Message message){
//        String msg = new String(message.getBody(), StandardCharsets.UTF_8);
//        System.out.println("消费者收到消息："+msg);
//        AfterPushRecord afterPushRecord = JSONObject.parseObject(msg, AfterPushRecord.class);
//        afterPushRecordMapper.insert(afterPushRecord);
//    }
}
